<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../css/mui.min.css" rel="stylesheet" />
		<style>
			html,
			body {
				width: 100%;
				height: 100%;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 id="title_h1" class="mui-title"></h1>
		</header>
		<div class="mui-content" style="width: 100%;background-color: #FFFFFF;">
			<div id="content_div" style="padding: 5%;font-size: 150%;width: 100%;height: 100%;">
			</div>
		</div>
		<script src="../js/mui.min.js"></script>
		<script src="../js/initData.js"></script>

		<script type="text/javascript">
			function showPage(n_id) {
				mui.ajax(url_getnews_xiangqing, {
					data: {
						"id": n_id
					},
					type: 'get', //HTTP请求类型
					timeout: 10000, //超时时间设置为10秒；
					success: function(data) {
						plus.nativeUI.closeWaiting();
						//服务器返回响应，根据响应结果，分析是否登录成功；
						console.log("新闻" + data);
						var json_value = JSON.parse(data);
						if(json_value.status == 200) {
							var body = json_value.value;
							document.getElementById("title_h1").innerText = removeHTMLTag(body.title);
							document.getElementById("content_div").innerHTML = body.content;
							plus.webview.currentWebview().show();
						} else {
							mui.toast(json_value.msg);
							plus.nativeUI.closeWaiting();
							plus.webview.currentWebview().close();
						}
					},
					error: function(xhr, type, errorThrown) {
						//异常处理；
						console.log(type);
						console.log(errorThrown);
						plus.nativeUI.closeWaiting();
					}
				});
			}
			mui.init();
			mui.plusReady(function() {
				console.log(plus.webview.currentWebview().nnn_id);
				mui('.mui-scroll-wrapper').scroll({
					indicators: true, //是否显示滚动条
					bounce: false
				});
				showPage(plus.webview.currentWebview().nnn_id);
			})
		</script>
	</body>

</html>